{% extends "../base_adminlte.html" %}

{% block content %}
<div class="content-wrapper">
  <!-- Content Header (Page header) -->
    <div class="content-header">
    </div>

  <section class="content">
      <form  action="{% url 'softwareadd' %}" method="post" enctype="multipart/form-data">
          <h2 style="margin-left:30% ">不能同时上传单个文件和文件夹，只能二选一,如果上传文件夹，软件包名字为软件包的名字</h2>
            <table style="border-collapse:separate; border-spacing: 0px 10px;
            margin-left: 40%;margin-top: 5%;align-content: center;">

                <tr>
                    <td>software文件名称</td>
                    <td><input type="text" name="software"  >
                       <label>*必填项</label>
                  </td>
                </tr>
                <tr>
                    <td>描述</td>
                    <td><input type="text" name="remark"  >
                       <label>*必填项</label>
                  </td>
                </tr>
                <tr>
                    <td>单个文件</td>
                    <td><input type="file" name="softwarefile" >
{#                       <label>{{ error.softwaresFile.0 }}</label>#}
                  </td>
                </tr>
               <tr>
                    <td>文件夹</td>
                    <td><input type="file" name="softwarefile_dir" multiple = "true" webkitdirectory="true" directory = "true">
{#                       <label>{{ error.softwaresFile.0 }}</label>#}
                  </td>
                </tr>
               <tr>
                    <td></td>
                    <td ><input type="submit" value="提交" >
                    <button style="margin-left: 10%" onclick="location.href='/ansible/softwarelist'" type="button" value="取消" >取消</button></td>
                 </tr>
            </table>
    </form>
  </section>
</div>

{% endblock %}
